package org.example.struct.array;

/**
 * @author liyishan
 * @date 2024/1/8 10:42
 * @apiNote
 */

public class Test01523CountOdds {

    public int countOdds(int low, int high) {
        return pre(high) - pre(low - 1);
    }

    public static int pre(int x) {
        return (x + 1) >> 1;
    }
}
